package com.pangyangyang.elasticsearch.plugin.canal.collector;/*
 * Created by gangzz.
 *  2015/7/3
 */

import com.alibaba.otter.canal.client.CanalConnector;

/**
 *
 */
public interface CanalCollectorFailOverStrategy {



    /**
     * 作为while循环的唯一判断条件
     * @return
     */
    boolean shouldStop( );

    void start(CanalConnector connector);
    void stop(CanalConnector connector);
    void whenError(CanalConnector connector, Throwable t);
}
